package jEDF.Dialog;

import jEDF.JEDF.*;

/**
 *
 * <p>Titre : jEDF</p>
 * <p>Description : Java European Data Format Viewer and Analyser</p>
 * <p>Author : Nizar Kerkeni</p>
 * <p>Copyright : Copyright (c) 2003-2006</p>
 * <p>Version 2.0</p>
 */

public class JEDFAboutDialog extends javax.swing.JDialog {

    // Variables declaration
    private javax.swing.JPanel jAboutPanel;
    private javax.swing.JPanel jBtnOKPanel;
    private javax.swing.JButton jButton1;
    private javax.swing.JPanel jCreditPanel;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JPanel jLicencePanel;
    private javax.swing.JLabel jLogoLabel;
    private javax.swing.JPanel jLogoPanel;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTextArea jTextArea1;
    private javax.swing.JTextArea jTextArea2;

    private static String version = "jEDF 2.0.1";
    private static String copyright = "Copyright (C) 2003-2006";

    /**
     * Creates new form JEDFAboutDialog
     * @param parent the parent
     * @param modal boolean
     */
    public JEDFAboutDialog(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();

        jTabbedPane1.addTab(JEDFMainWindow.getLocalizedString("About jEDF"), jAboutPanel);
        jTabbedPane1.addTab(JEDFMainWindow.getLocalizedString("Contribution"), jCreditPanel);
        jTabbedPane1.addTab(JEDFMainWindow.getLocalizedString("Licence"), jLicencePanel);
        setLocationRelativeTo(null);
        this.setVisible(true);
    }

    /**
     * This method is called from within the constructor to
     * initialize the form.
     */
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        jLogoPanel = new javax.swing.JPanel();
        jLogoLabel = new javax.swing.JLabel();
        jBtnOKPanel = new javax.swing.JPanel();
        jButton1 = new javax.swing.JButton();
        jPanel3 = new javax.swing.JPanel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jAboutPanel = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jCreditPanel = new javax.swing.JPanel();
        jTextArea1 = new javax.swing.JTextArea();
        jTextArea2 = new javax.swing.JTextArea();
        jLicencePanel = new javax.swing.JPanel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle(version);
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        setFont(new java.awt.Font("A.D. MONO", 0, 10));
        setForeground(java.awt.Color.white);
        setModal(true);
        setName("jEDFAboutDialog");
        setResizable(false);
        jLogoPanel.setLayout(new java.awt.BorderLayout());

        jLogoPanel.setBorder(new javax.swing.border.EtchedBorder(javax.swing.border.EtchedBorder.
                RAISED));
        jLogoPanel.setPreferredSize(new java.awt.Dimension(80, 180));
        jLogoLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLogoLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource(
                "/jEDF/icons/jEDFSmallLogo90.png")));
        jLogoPanel.add(jLogoLabel, java.awt.BorderLayout.CENTER);

        getContentPane().add(jLogoPanel, java.awt.BorderLayout.WEST);

        jBtnOKPanel.setBorder(new javax.swing.border.EtchedBorder(javax.swing.border.EtchedBorder.
                RAISED));
        jBtnOKPanel.setPreferredSize(new java.awt.Dimension(350, 35));
        jButton1.setText("Ok");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jBtnOKPanel.add(jButton1);

        getContentPane().add(jBtnOKPanel, java.awt.BorderLayout.SOUTH);

        jPanel3.setLayout(new java.awt.BorderLayout());

        jPanel3.setPreferredSize(new java.awt.Dimension(350, 250));
        jAboutPanel.setLayout(new java.awt.GridBagLayout());

        jLabel1.setFont(new java.awt.Font("Dialog", 1, 14));
        jLabel1.setForeground(new java.awt.Color(0, 0, 255));
        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setText(version);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(30, 5, 30, 5);
        jAboutPanel.add(jLabel1, gridBagConstraints);

        jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel4.setText(copyright);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(10, 0, 10, 0);
        jAboutPanel.add(jLabel2, gridBagConstraints);

        jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel3.setText("Nizar Kerkeni");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(10, 0, 10, 0);
        jAboutPanel.add(jLabel3, gridBagConstraints);

        jLabel2.setText("http://webloria.loria.fr/~kerkeni/jEDF.html");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.insets = new java.awt.Insets(10, 0, 10, 0);
        jAboutPanel.add(jLabel4, gridBagConstraints);

        jTabbedPane1.addTab("About jEDF", jAboutPanel);

        jCreditPanel.setLayout(new java.awt.BorderLayout());

        jTextArea1.setEditable(false);
        jTextArea1.setText(
                "\n - Nizar Kerkeni <Nizar.Kerkeni@loria.fr>\n - Christophe Masson <CMasson@free.fr>");
        jCreditPanel.add(jTextArea1, java.awt.BorderLayout.CENTER);

        jTabbedPane1.addTab("Contribution", jCreditPanel);

        jTextArea2.setEditable(false);
        jTextArea2.setFont(new java.awt.Font("Dialog", 0, 10));
        jTextArea2.setText(
                "jEDF java EDF files visualisation and manipulation" +
                "\nCopyright (C) 2003-2006  Nizar Kerkeni Nizar.Kerkeni@fst.rnu.tn" +
                "\n"+
                "\nThis program is free software; you can redistribute it and/or modify" +
                "\nit under the terms of the GNU General Public License as published by" +
                "\nthe Free Software Foundation; version 2 of the License." +
                "\n" +
                "\nThis program is distributed in the hope that it will be useful," +
                "\nbut WITHOUT ANY WARRANTY; without even the implied warranty of" +
                "\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the" +
                "\nGNU General Public License for more details." +
                "\n" +
                "\nYou should have received a copy of the GNU General Public License" +
                "\nalong with this program; if not, write to the Free Software" +
                "\nFoundation, Inc. (http://www.fsf.org)" +
                "\n59 Temple Place, Suite 330, Boston, MA  02111-1307  USA");
        jLicencePanel.add(jTextArea2, java.awt.BorderLayout.CENTER);

        jTabbedPane1.addTab("Licence", jLicencePanel);

        jPanel3.add(jTabbedPane1, java.awt.BorderLayout.CENTER);

        getContentPane().add(jPanel3, java.awt.BorderLayout.CENTER);

        pack();
    }

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
        this.dispose();
    }
}
